<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page isELIgnored="false"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Error Page</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            text-align: center;
            margin-top: 50px;
        }
        .error-container {
            padding: 30px;
            border: 1px solid #f2f2f2;
            background-color: #f9f9f9;
            display: inline-block;
            border-radius: 10px;
        }
        .error-container h1 {
            color: #e74c3c;
            font-size: 36px;
        }
        .error-container p {
            color: #555;
            font-size: 18px;
        }
        .error-container a {
            color: #3498db;
            text-decoration: none;
        }
        .error-container a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="error-container">
        <h1>Error Occurred</h1>
        <p>
            Sorry, an error has occurred. Please try again later or <a href="/">go back to the home page</a>.
        </p>
        <p>
            <strong>Error Details:</strong>
            <br/>
            <%= request.getAttribute("javax.servlet.error.exception") != null ? request.getAttribute("javax.servlet.error.exception") : "No details available" %>
        </p>
    </div>

</body>
</html>
